home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Software Contest 3
/
FM Towns Software Contest 3.iso
/
exp
/
video_t
/
no1
/
c_sorse
/
telop2.c
< prev
next >
Wrap
Text File
|
1994-01-07
|
3KB
|
127 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>
int Dialog_telop = -1 ;
int Message_telop1 = -1 ;
int Message_telop2 = -1 ;
int _001Message_telop2 = -1 ;
int TIcon_telop[2] = -1 ;
int DButton_telopon = -1 ;
int _001DButton_telopon = -1 ;
int Message_telop10 = -1 ;
int _001Message_telop10 = -1 ;
extern int backid ;
extern int Dia_edit ;
extern int Dialog_menu ;
extern int Text ;
extern telop() ;
extern char *guiEgbPtr ;
int radiotelop = 0 ;
/* initDataTELOP:TIcon_telop[0]:MJ_TICONL40の呼び出し関数 */
/* initDataTELOP:TIcon_telop[1]:MJ_TICONL40の呼び出し関数 */
int telop_icon(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
/* 現在選択状態にあるボタンを非選択状態にし、選択可にします */
MTL_resetFlagObj(radiotelop,~(MS_UNSELECT | MS_TOGGLE)) ;
MMI_SendMessage(radiotelop, MM_SHOW, 0) ;
/* 画面選択フラグを更新します */
radiotelop = kobj ;
/* 呼び出し元トグルボタンを選択状態にし、選択不可にします */
MTL_setFlagObj(kobj, MS_UNSELECT | MS_TOGGLE) ;
MMI_SendMessage(kobj, MM_SHOW, 0) ;
return NOERR ;
}
/*initDataTELOP:DButton_telopon:MJ_DBUTTONL40の呼び出し関数 */
extern char *pwork;
int telop_go(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
int i;
for (i = 0 ; i < 2 ; i++)
{
if (TIcon_telop[i] == radiotelop) break ;
}
MG_pushEgbWork(guiEgbPtr,&pwork);
if(i!=2)
{
MMI_SendMessage(Dialog_telop,MM_ERASE,0) ;
MMI_SendMessage(Dialog_telop,MM_DETACH,0) ;
if(i==0) { go_fail(); telop(0); }
else telop(1);
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
MG_popEgbWork(guiEgbPtr,pwork);
WINCLIP *pwclp ;
FRAME fr ;
fr.lupx = 0 ;
fr.lupy = 0 ;
fr.rdwx = 639 ;
fr.rdwy = 479 ;
pwclp = WIN_getClipMemory(&fr, NULL) ;
MMI_SendMessage(MMI_GetBaseObj(), MM_UPDATE, 1, pwclp) ;
WIN_freeClipMemory(pwclp) ;
MMI_SendMessage(Text, MM_ERASE, 0) ;
MMI_SendMessage(Text, MM_WAKE, 0) ;
MMI_SendMessage(Text, MM_SHOW, 0) ;
}
return NOERR ;
}
/* initDataTELOP:_001DButton_telopon:MJ_DBUTTONL40の呼び出し関数 */
int telop_off(kobj, messId, argc, pev, trigger)
int kobj ;
int messId ;
int argc ;
EVENT *pev ;
int trigger ;
{
MMI_SendMessage(Dialog_telop,MM_ERASE,0) ;
MMI_SendMessage(Dialog_telop,MM_DETACH,0) ;
/* メニューを選択可とします。 */
MTL_resetAtrObj(Dialog_menu, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(Dia_edit, ~MS_DSPONLYL40) ;
MTL_resetAtrObj(backid, ~MS_DSPONLYL40) ;
return NOERR ;
}
int l_telop()
{
/* 背景を選択不可とします。*/
MTL_setAtrObj(backid, MS_DSPONLYL40) ;
MTL_setAtrObj(Dialog_menu, MS_DSPONLYL40) ;
MTL_setAtrObj(Dia_edit, MS_DSPONLYL40) ;
MMI_SendMessage(Dialog_telop,MM_ATTACH,1,MMI_GetBaseObj()) ;
MMI_SendMessage(Dialog_telop, MM_SHOW, 0) ;
return NOERR ;
}